﻿<%@ Page Language="C#" %>

<% 
    if (Request.QueryString["btnDoUpdate"] != null && Request.QueryString["idHoaDon"] != null && Request.QueryString["newState"] != null)
    {
        int idHoaDon = Int16.Parse(Request["idHoaDon"]);
        int newState = Int16.Parse(Request["newState"]);

        bool res = BUS.HoaDonBus.CapNhatTinhTrangHoaDon(idHoaDon, newState);
        if (res == false)
        {
            Response.Write("-1");
        }
        else
        {
            Response.Write("1");
        }
    }
    else
    {
        Response.Redirect("../Default.aspx");
    }  
%>
